package com.example.data0306.Adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.data0306.R;
import com.example.data0306.bean.NewsArticleBean;

import org.jetbrains.annotations.NotNull;

public class NewContentAdapter extends BaseQuickAdapter<NewsArticleBean, BaseViewHolder> {

    public NewContentAdapter() {
        super(R.layout.view_content_new);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, NewsArticleBean newsArticleBean) {

        baseViewHolder.setText(R.id.tv_article_title,newsArticleBean.getTitle());
        //baseViewHolder.setImageResource(R.id.img_cover,R.drawable.icon_navigation_head_info_bg);
        baseViewHolder.setImageResource(R.id.img_cover,newsArticleBean.getIcon());
        baseViewHolder.setText(R.id.tv_tag,"LOL");
        baseViewHolder.setText(R.id.tv_article_user,"史努比");
        baseViewHolder.setText(R.id.tv_view_number,"12332");
    }
}
